home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / srcuc.zip / RETURNS.H < prev    next >
Text File  |  1992-02-08  |  9KB  |  225 lines

  1. /* -*-C-*-
  2.  
  3. $Header: /scheme/users/cph/src/microcode/RCS/returns.h,v 9.40 1992/02/08 14:54:12 cph Exp $
  4.  
  5. Copyright (c) 1987-92 Massachusetts Institute of Technology
  6.  
  7. This material was developed by the Scheme project at the Massachusetts
  8. Institute of Technology, Department of Electrical Engineering and
  9. Computer Science.  Permission to copy this software, to redistribute
  10. it, and to use it for any purpose is granted, subject to the following
  11. restrictions and understandings.
  12.  
  13. 1. Any copy made of this software must include this copyright notice
  14. in full.
  15.  
  16. 2. Users of this software agree to make their best efforts (a) to
  17. return to the MIT Scheme project any improvements or extensions that
  18. they make, so that these may be included in future releases; and (b)
  19. to inform MIT of noteworthy uses of this software.
  20.  
  21. 3. All materials developed as a consequence of the use of this
  22. software shall duly acknowledge such use, in accordance with the usual
  23. standards of acknowledging credit in academic research.
  24.  
  25. 4. MIT has made no warrantee or representation that the operation of
  26. this software will be error-free, and MIT is under no obligation to
  27. provide any services, by way of maintenance, update, or otherwise.
  28.  
  29. 5. In conjunction with products arising from the use of this material,
  30. there shall be no use of the name of the Massachusetts Institute of
  31. Technology nor of any adaptation thereof in any advertising,
  32. promotional, or sales literature without prior written consent from
  33. MIT in each case. */
  34.  
  35. /* Return codes.  These are placed in Return when an
  36.    interpreter operation needs to operate in several phases. */
  37.  
  38. #define RC_END_OF_COMPUTATION        0x00
  39. /* formerly RC_RESTORE_CONTROL_POINT    0x01 */
  40. #define RC_JOIN_STACKLETS        0x01
  41. #define RC_RESTORE_CONTINUATION        0x02 /* Used for 68000 */
  42. #define RC_INTERNAL_APPLY        0x03
  43. #define RC_BAD_INTERRUPT_CONTINUE     0x04 /* Used for 68000 */
  44. #define RC_RESTORE_HISTORY         0x05
  45. #define RC_INVOKE_STACK_THREAD         0x06
  46. #define RC_RESTART_EXECUTION         0x07 /* Used for 68000 */
  47. #define RC_EXECUTE_ASSIGNMENT_FINISH    0x08
  48. #define RC_EXECUTE_DEFINITION_FINISH    0x09
  49. #define RC_EXECUTE_ACCESS_FINISH    0x0A
  50. #define RC_EXECUTE_IN_PACKAGE_CONTINUE  0x0B
  51. #define RC_SEQ_2_DO_2            0x0C
  52. #define RC_SEQ_3_DO_2            0x0D
  53. #define RC_SEQ_3_DO_3            0x0E
  54. #define RC_CONDITIONAL_DECIDE        0x0F
  55. #define RC_DISJUNCTION_DECIDE        0x10
  56. #define RC_COMB_1_PROCEDURE        0x11
  57. #define RC_COMB_APPLY_FUNCTION        0x12
  58. #define RC_COMB_2_FIRST_OPERAND        0x13
  59. #define RC_COMB_2_PROCEDURE        0x14
  60. #define RC_COMB_SAVE_VALUE        0x15
  61. #define RC_PCOMB1_APPLY            0x16
  62. #define RC_PCOMB2_DO_1            0x17
  63. #define RC_PCOMB2_APPLY            0x18
  64. #define RC_PCOMB3_DO_2            0x19
  65. #define RC_PCOMB3_DO_1            0x1A
  66. #define RC_PCOMB3_APPLY            0x1B
  67. #define RC_SNAP_NEED_THUNK        0x1C
  68. #define RC_REENTER_COMPILED_CODE     0x1D
  69. /* formerly RC_GET_CHAR_REPEAT        0x1E */
  70. #define RC_COMP_REFERENCE_RESTART     0x1F
  71. #define RC_NORMAL_GC_DONE         0x20
  72. #define RC_COMPLETE_GC_DONE         0x21 /* Used for 68000 */
  73. #define RC_PURIFY_GC_1            0x22
  74. #define RC_PURIFY_GC_2            0x23
  75. #define RC_AFTER_MEMORY_UPDATE         0x24 /* Used for 68000 */
  76. #define RC_RESTARTABLE_EXIT         0x25 /* Used for 68000 */
  77. /* formerly RC_GET_CHAR         0x26 */
  78. /* formerly RC_GET_CHAR_IMMEDIATE    0x27 */
  79. #define RC_COMP_ASSIGNMENT_RESTART     0x28
  80. #define RC_POP_FROM_COMPILED_CODE     0x29
  81. #define RC_RETURN_TRAP_POINT        0x2A
  82. #define RC_RESTORE_STEPPER        0x2B /* Used for 68000 */
  83. #define RC_RESTORE_TO_STATE_POINT    0x2C
  84. #define RC_MOVE_TO_ADJACENT_POINT    0x2D
  85. #define RC_RESTORE_VALUE        0x2E
  86. #define RC_RESTORE_DONT_COPY_HISTORY    0x2F
  87.  
  88. /* The following are not used in the 68000 implementation */
  89. #define RC_POP_RETURN_ERROR        0x40
  90. #define RC_EVAL_ERROR            0x41
  91. #define RC_STACK_MARKER            0x42
  92. #define RC_COMP_INTERRUPT_RESTART    0x43
  93. /* formerly RC_COMP_RECURSION_GC    0x44 */
  94. #define RC_RESTORE_INT_MASK        0x45
  95. #define RC_HALT                0x46
  96. #define RC_FINISH_GLOBAL_INT        0x47    /* Multiprocessor */
  97. #define RC_REPEAT_DISPATCH        0x48
  98. #define RC_GC_CHECK            0x49
  99. #define RC_RESTORE_FLUIDS        0x4A
  100. #define RC_COMP_LOOKUP_APPLY_RESTART    0x4B
  101. #define RC_COMP_ACCESS_RESTART        0x4C
  102. #define RC_COMP_UNASSIGNED_P_RESTART    0x4D
  103. #define RC_COMP_UNBOUND_P_RESTART    0x4E
  104. #define RC_COMP_DEFINITION_RESTART    0x4F
  105. /* formerly RC_COMP_LEXPR_INTERRUPT_RESTART 0x50 */
  106. #define RC_COMP_SAFE_REFERENCE_RESTART  0x51
  107. /* formerly RC_COMP_CACHE_LOOKUP_RESTART      0x52 */
  108. #define RC_COMP_LOOKUP_TRAP_RESTART      0x53
  109. #define RC_COMP_ASSIGNMENT_TRAP_RESTART 0x54
  110. /* formerly RC_COMP_CACHE_OPERATOR_RESTART    0x55 */
  111. #define RC_COMP_OP_REF_TRAP_RESTART    0x56
  112. #define RC_COMP_CACHE_REF_APPLY_RESTART 0x57
  113. #define RC_COMP_SAFE_REF_TRAP_RESTART   0x58
  114. #define RC_COMP_UNASSIGNED_TRAP_RESTART 0x59
  115. /* formerly RC_COMP_CACHE_ASSIGN_RESTART    0x5A */
  116. #define RC_COMP_LINK_CACHES_RESTART    0x5B
  117. #define RC_HARDWARE_TRAP        0x5C
  118. #define RC_INTERNAL_APPLY_VAL        0x5D
  119. #define RC_COMP_ERROR_RESTART        0x5E
  120. #define RC_PRIMITIVE_CONTINUE        0x5F
  121.  
  122. /* When adding return codes, add them to the table below as well! */
  123.  
  124. #define MAX_RETURN_CODE            0x5F
  125.  
  126. #define RETURN_NAME_TABLE                        \
  127. {                                    \
  128. /* 0x00 */        "END_OF_COMPUTATION",                \
  129. /* 0x01 */        "JOIN_STACKLETS",                \
  130. /* 0x02 */        "RESTORE_CONTINUATION",                \
  131. /* 0x03 */        "INTERNAL_APPLY",                \
  132. /* 0x04 */        "BAD_INTERRUPT_CONTINUE",            \
  133. /* 0x05 */        "RESTORE_HISTORY",                \
  134. /* 0x06 */        "INVOKE_STACK_THREAD",                \
  135. /* 0x07 */        "RESTART_EXECUTION",                \
  136. /* 0x08 */        "EXECUTE_ASSIGNMENT_FINISH",            \
  137. /* 0x09 */        "EXECUTE_DEFINITION_FINISH",            \
  138. /* 0x0A */        "EXECUTE_ACCESS_FINISH",            \
  139. /* 0x0b */        "EXECUTE_IN_PACKAGE_CONTINUE",            \
  140. /* 0x0C */        "SEQ_2_DO_2",                    \
  141. /* 0x0d */        "SEQ_3_DO_2",                    \
  142. /* 0x0E */        "SEQ_3_DO_3",                    \
  143. /* 0x0f */        "CONDITIONAL_DECIDE",                \
  144. /* 0x10 */        "DISJUNCTION_DECIDE",                \
  145. /* 0x11 */        "COMB_1_PROCEDURE",                \
  146. /* 0x12 */        "COMB_APPLY_FUNCTION",                \
  147. /* 0x13 */        "COMB_2_FIRST_OPERAND",                \
  148. /* 0x14 */        "COMB_2_PROCEDURE",                \
  149. /* 0x15 */        "COMB_SAVE_VALUE",                \
  150. /* 0x16 */        "PCOMB1_APPLY",                    \
  151. /* 0x17 */        "PCOMB2_DO_1",                    \
  152. /* 0x18 */        "PCOMB2_APPLY",                    \
  153. /* 0x19 */        "PCOMB3_DO_2",                    \
  154. /* 0x1A */        "PCOMB3_DO_1",                    \
  155. /* 0x1B */        "PCOMB3_APPLY",                    \
  156. /* 0x1C */        "SNAP_NEED_THUNK",                \
  157. /* 0x1D */        "REENTER_COMPILED_CODE",            \
  158. /* 0x1E */        "",                        \
  159. /* 0x1F */        "COMP_REFERENCE_RESTART",            \
  160. /* 0x20 */        "NORMAL_GC_DONE",                \
  161. /* 0x21 */        "COMPLETE_GC_DONE",                \
  162. /* 0x22 */        "PURIFY_GC_1",                    \
  163. /* 0x23 */        "PURIFY_GC_2",                    \
  164. /* 0x24 */        "AFTER_MEMORY_UPDATE",                \
  165. /* 0x25 */        "RESTARTABLE_EXIT",                \
  166. /* 0x26 */        "",                        \
  167. /* 0x27 */        "",                        \
  168. /* 0x28 */        "COMP_ASSIGNMENT_RESTART",            \
  169. /* 0x29 */        "POP_FROM_COMPILED_CODE",            \
  170. /* 0x2A */        "RETURN_TRAP_POINT",                \
  171. /* 0x2B */        "RESTORE_STEPPER",                \
  172. /* 0x2C */        "RESTORE_TO_STATE_POINT",            \
  173. /* 0x2D */        "MOVE_TO_ADJACENT_POINT",            \
  174. /* 0x2E */        "RESTORE_VALUE",                \
  175. /* 0x2F */        "RESTORE_DONT_COPY_HISTORY",            \
  176. /* 0x30 */        "",                        \
  177. /* 0x31 */        "",                        \
  178. /* 0x32 */        "",                        \
  179. /* 0x33 */        "",                        \
  180. /* 0x34 */        "",                        \
  181. /* 0x35 */        "",                        \
  182. /* 0x36 */        "",                        \
  183. /* 0x37 */        "",                        \
  184. /* 0x38 */        "",                        \
  185. /* 0x39 */        "",                        \
  186. /* 0x3A */        "",                        \
  187. /* 0x3B */        "",                        \
  188. /* 0x3C */        "",                        \
  189. /* 0x3D */        "",                        \
  190. /* 0x3E */        "",                        \
  191. /* 0x3F */        "",                        \
  192. /* 0x40 */        "POP_RETURN_ERROR",                \
  193. /* 0x41 */        "EVAL_ERROR",                    \
  194. /* 0x42 */        "STACK_MARKER",                    \
  195. /* 0x43 */        "COMPILER_INTERRUPT_RESTART",            \
  196. /* 0x44 */        "",                        \
  197. /* 0x45 */        "RESTORE_INT_MASK",                \
  198. /* 0x46 */        "HALT",                        \
  199. /* 0x47 */        "FINISH_GLOBAL_INT",                \
  200. /* 0x48 */        "REPEAT_DISPATCH",                \
  201. /* 0x49 */        "GC_CHECK",                    \
  202. /* 0x4A */        "RESTORE_FLUIDS",                \
  203. /* 0x4B */        "COMPILER_LOOKUP_APPLY_RESTART",        \
  204. /* 0x4C */        "COMPILER_ACCESS_RESTART",            \
  205. /* 0x4D */        "COMPILER_UNASSIGNED_P_RESTART",        \
  206. /* 0x4E */        "COMPILER_UNBOUND_P_RESTART",            \
  207. /* 0x4F */        "COMPILER_DEFINITION_RESTART",            \
  208. /* 0x50 */        "",                        \
  209. /* 0x51 */        "COMPILER_SAFE_REFERENCE_RESTART",        \
  210. /* 0x52 */        "",                        \
  211. /* 0x53 */        "COMPILER_LOOKUP_TRAP_RESTART",            \
  212. /* 0x54 */        "COMPILER_ASSIGNMENT_TRAP_RESTART",        \
  213. /* 0X55 */        "",                        \
  214. /* 0x56 */        "COMPILER_OPERATOR_REFERENCE_TRAP_RESTART",    \
  215. /* 0x57 */        "COMPILER_CACHE_REFERENCE_APPLY_RESTART",    \
  216. /* 0x58 */        "COMPILER_SAFE_REFERENCE_TRAP_RESTART",        \
  217. /* 0x59 */        "COMPILER_UNASSIGNED_P_TRAP_RESTART",        \
  218. /* 0x5A */        "",                        \
  219. /* 0x5B */        "COMPILER_LINK_CACHES_RESTART",            \
  220. /* 0x5C */        "HARDWARE_TRAP",                \
  221. /* 0x5D */        "INTERNAL_APPLY_VAL",                \
  222. /* 0x5E */        "COMPILER_ERROR_RESTARRT",            \
  223. /* 0x5F */        "PRIMITIVE_CONTINUE"                \
  224. }
  225.